using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;

namespace SunshineFarmWord
{
    public class PlayerMiningState : PlayerBaseStates
    {
        public PlayerMiningState(PlayerStateMachine playerStateMachine) : base(playerStateMachine)
        {
        }

        #region Base function
        public override void Enter()
        {
            base.Enter();

            StartAnimation(stateMachine.Player.AnimationData.MiningParameterHash);
        }

        public override void Exit()
        {
            base.Exit();

            StopAnimation(stateMachine.Player.AnimationData.MiningParameterHash);
        }
        #endregion


        #region 按键监听

        //交互
        protected override void OnInteractStarted(InputAction.CallbackContext context)
        {
            base.OnInteractStarted(context);

            stateMachine.ChangeState(stateMachine.IdlingState);
        }
        #endregion
    }
}
